import request from "@/utils/Request";

import type {UploadImageDTO} from "@/types/Upload";
import type {PageResult} from "@/types/PageResult";

/**
 * 获取用户上传的图片
 */
export const getAuditImageApi = () => {
    return request<"", Result<UploadImageDTO[]>>({
            url: `/admin/audit/image`,
            method: 'get',
        }
    )
}

/**
 *  获取历史审核图集
 */
export const getHistoryAuditImageApi = (page: number, pageSize: number,id?:number) => {
    return request<"", Result<PageResult<UploadImageDTO[]>>>({
            url: `/admin/audit/image/history`,
            method: 'get',
            params: {
                page,
                pageSize,
                id
            }
        }
    )
}

/**
 * 提交审核图片
 */
export const submitAuditImgApi = (data: UploadImageDTO[]) => {
    return request<UploadImageDTO[], Result<any>>({
            url: `/admin/audit/image/submit`,
            method: 'POST',
            data
        }
    )
}